package com.eqdd.yiqidian.ui.mine.shenqing;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;

import com.eqdd.yiqidian.R;
import com.eqdd.yiqidian.annotation.DealCode;
import com.eqdd.yiqidian.base.BaseShowActivity;
import com.eqdd.yiqidian.base.CodeRule;
import com.eqdd.yiqidian.base.Config;
import com.eqdd.yiqidian.rxbus2.Subscribe;
import com.eqdd.yiqidian.rxbus2.ThreadMode;
import com.eqdd.yiqidian.ui.mine.shenqing.fragment.MyCreateOverTimeFragment;

@DealCode(codes = {CodeRule.SHENGQING_JIABAN})
public class ShowMyOverTimeActivity extends BaseShowActivity {


    @Subscribe(codes = {CodeRule.SHENGQING_JIABAN},threadMode = ThreadMode.MAIN)
    public void refreshCode() {

    }
    @Override
    protected void initTitle() {
        initTopTitleBar(View.VISIBLE, "加班列表");
        initTopRightImage(R.mipmap.add, v -> {
            startActivityForResult(ApplyOverTimeActivity.class, null, Config.APPLY_OVER_TIME);
        });
    }

    @Override
    public void initData() {
        isRxbus=true;
        titles.add("待审核");
        titles.add("已审核");
    }

    protected Fragment getFragment(int status) {
        MyCreateOverTimeFragment fragment = new MyCreateOverTimeFragment();
        Bundle bundle = new Bundle();
        bundle.putInt(Config.STATUS, status);
        bundle.putInt(Config.WHO, 0);
        fragment.setArguments(bundle);
        return fragment;
    }

}
